<template>
	<view class="container-bg top pad-24">
		<u-navbar title="公告详情" placeholder :autoBack="true"></u-navbar>
		<view class="font-42">{{info.title}}</view>
		<view class="pad-top-bottom-16 mar-bottom-32 font-24 color-grey border-bottom">
			{{$u.timeFormat(info.created_at, 'yyyy-mm-dd hh:MM:ss')}}
		</view>
		<view class="mar-bottom-32 mar-top-62">
			<image class="image-size" :src="info.cover"></image>
		</view>
		<u-parse :content="info.content"></u-parse>
	</view>
</template>

<script>
	// 接口地址
	import {
		noticeInfo
	} from '@/config/api.js'
	export default {
		data() {
			return {
				info: {}
			}
		},
		onLoad(options) {
			this.infoId = options.id
			this.getDataInfo()
		},
		methods: {
			getDataInfo() {
				noticeInfo({
					id: this.infoId
				}).then(res => {
					this.info = res.data.info
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container-bg {
		min-height: 100vh;

		::v-deep .u-navbar__content {

			background-size: cover;
			background-repeat: no-repeat;
			background-color: #f5f5f5;
		}
	}


	.title {
		font-weight: 600;
	}

	.border-bottom {
		border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
	}
	
	.image-size{
		width: 100%;
		height: 250rpx;
	}
</style>